#ifndef CONFIRMCARINTERFACE_H
#define CONFIRMCARINTERFACE_H

#include "globalParameterForTaxi.h"
#include "interface/IInterface.h"
#include "socket/protocol/CarChooseClient.h"
#include "socket/protocol/CarAbandonBook.h"

namespace Ui {
    class ConfirmClient;
}

namespace interface
{

class CConfirmClientInterface : public IInterface
{
    Q_OBJECT

public:
    explicit CConfirmClientInterface(IInterface *parent = 0, CHOSEN_CLIENT_INFO *pChosenClientInfo = 0);
    ~CConfirmClientInterface();

private Q_SLOTS:
    // the user has confirmed a taxi, and should send the car id and user id to the server
    void confirm();
    // the user has cancelled the order, and should send the failure info to the car driver
    void cancel();

    // slots for socket communication
    void readResult();
    void socketError();

private:
    // prepare for the background setting
    virtual void UiSetting(Ui::ConfirmClient *ui);

private:
    Ui::ConfirmClient *m_pUi;
    protocal::CCarChooseClient *m_pCarChooseClient;
    protocal::CarAbandonBook * m_pCarAbandonBook;
};
}
#endif // CONFIRMCARINTERFACE_H
